import { http } from "@/util/request/index";

// 当前用户的代理商身份
export const currentAgent = (data) => {
  return http.get("/api/agent/current/", data);
};

// 代理商统计
export const agentStatistics = () => {
  return http.get("/api/dashboard/agent/");
};

// 生成微信小程序码
export const wxMiniProgramQRCode = (data) => {
  return http.post("/api/wx/qrcode/", data);
};

// 切换代理区域
export const switchAgentArea = (data) => {
  return http.post("/api/agent/switch/", data);
};

// 属下商户
export const agentMerchant = () => {
  return http.get("/api/merchtants/agent/");
};

// 属下供应商
export const agentSupplier = () => {
  return http.get("/api/supplier/agent/");
};

// 提成明细
export const agentCommission = () => {
  return http.get("/api/agent/bill/");
};
